Readme
Example Summary
The following example configures ADC0 to trigger single conversion and turn on an LED if ADC > 0.5*VDD. Otherwise, LED1 remains off.
Peripherals & Pin Assignments
- ADC0
- A0_2 / PA25
- GPIOA
- Open-drain Output: PA0
BoosterPacks, Board Resources & Jumper Settings
- Boosterpack connections:
- J1.2 - PA25 (GPIO_ADC12_C2_PIN)
- Board resources:
- LED1 - PA0 (GPIO_LEDS_USER_LED_1_PIN)
- Jumper settings:
- J4 ON
- J9 [1:2]
Example Usage
Compile, load and run the example. Provide a valid voltage to A0_2 between 0 - VCC. Monitor LED1 while input voltage changes.
On powerup, the ADC pin(s) used in this example are by default set to the correct analog mode. Therefore, calls to DL_GPIO_initPeripheralAnalogFunction for pinmuxing those pins are not needed.